"""
[program:flask]
command=/root/.envs/py3/bin/gunicorn -c deploy_gun_conf.py faster_api.wsgi:app --log-level=info
directory=/root/flask_demo/ppp_api/flask_faster/
autorestart=true
startsecs=3
startretries=3
stdout_logfile=/opt/flask.out.log
stderr_logfile=/opt/flask.err.log
stdout_logfile_maxbytes=2MB
stderr_logfile_maxbytes=2MB
user=root
priority=999
numprocs=1
process_name=%(program_name)s_%(process_num)02d
"""

import os

if __name__ == '__main__':
    print(os.getpid())
    cmd = """gunicorn    faster_api.wsgi:app --log-level=info   -b 0.0.0.0:5000"""
    # cmd = """gunicorn -c ./deploy_gun_conf.py app_faster.wsgi --log-level=info"""
    # cmd = """gunicorn app_faster.wsgi"""
    os.system(cmd)
